package cn.interestingshop.service.impl;

import cn.interestingshop.dao.GoodsDao;
import cn.interestingshop.dao.impl.GoodsDaoImpl;
import cn.interestingshop.entity.Goods;
import cn.interestingshop.entity.User;
import cn.interestingshop.service.GoodsService;

import java.util.List;

public class GoodsServiceImpl implements GoodsService {
    GoodsDao dao=new GoodsDaoImpl();

    @Override
    public List<Goods> selectAll(int pageNo, int pageSize) {
        return dao.selectAll(pageNo,pageSize);
    }

    @Override
    public int selectCount() {
        return dao.selectCount();
    }

    @Override
    public int insert(Goods goods) {
        return dao.insert(goods);
    }

    @Override
    public Goods selectOne(int id) {
        return dao.selectOne(id);
    }

    @Override
    public int update(Goods goods) {
        return dao.update(goods);
    }

    @Override
    public int delete(int id) {
        return dao.delete(id);
    }

    @Override
    public List<Goods> selectAll(int classifyLevel1Id, int pageNo, int pageSize) {
        return dao.selectAll(classifyLevel1Id,pageNo,pageSize);
    }
}
